package com.bjt.wms.sys.service;

import com.bjt.wms.sys.model.Employee;
import com.bjt.wms.sys.model.Material;
import com.bjt.wms.sys.model.Warehouse;
import com.jfinal.aop.Inject;
import com.jfinal.kit.Kv;

import java.util.List;

/**
 * 数据字典服务
 */
public class DataDicService {

    @Inject
    private EmployeeService employeeService;
    @Inject
    private WarehouseService warehouseService;
    @Inject
    private MaterialService materialService;

    /**
     * 获取数据字典项，提供前端|移动端用户解码
     */
    public Kv getDataDicList() {
        List<Warehouse> list = warehouseService.list();
        List<Employee> list2 = employeeService.list();
        List<Material> list3 = materialService.list();

        Kv kv = Kv.create();
        kv.set("warehouseList", list);
        kv.set("employeeList", list2);
        kv.set("materialList", list3);
        return kv;
    }
}
